<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>文章详情</title>
  <link href="./public/home/css/base.css" rel="stylesheet">
  <link href="./public/home/css/new.css" rel="stylesheet">
  <script src="../public/home/js/modernizr.js"></script>
  <link href="./public/home/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<header>
  <div id="logo"><a href="/"></a></div>
  <nav class="topnav" id="topnav">
    <a href="/"><span>首页</span><span class="en">Protal</span></a>
    <a href="?c=About&a=List"><span>关于我</span><span class="en">About</span></a>
    <a href="?c=Me&a=List"><span>留言版</span><span class="en">Gustbook</span></a>
  </nav>
</header>

<article class="blogs">
  <div class="index_about">
    <h2 class="c_titile"><?php echo $art_row['art_title'];?></h2>
    <p class="box_c"><span class="d_time">发布时间：<?php echo date('Y-m-d h:i:s',$art_row['aer_time']);?></span><span>编辑：<?php echo $art_row['art_name'];?></span> <span>浏览：<?php echo $art_row['art_num'];?></span><span>栏目：<a href="?c=Class&a=List&col_id=<?php echo$art_row['col_id'];?>"><?php echo $col_row['col_content'];?></a></span></p>
    <ul class="infos">
      <?php echo $art_row['art_content'];?>
    </ul>
    <div class="otherlink">
      <h2 style="background: url(/public/home/images/pl.png) 10px center no-repeat;background-size: 20px;">评论</h2>
    </div>
    <div class="ad">
      <form role="form" style="width: 80%;" method="post" action="?c=Discuss&a=Insert&art_id=<?php echo $art_id;?>" onsubmit=" return show()">
        <div class="form-group">
          <label for="name">姓名:</label>
          <input type="text" class="form-control" placeholder="请输入名字" id="name" name="name" maxlength="6">
        </div>
        <div class="form-group">
          <label for="name">评论:</label>
          <input type="hidden" value="<?php echo $art_id;?>" name="art_id">
          <textarea class="form-control" rows="3" id="content" name="content" maxlength="200"></textarea>
        </div>
        <input class="btn btn-default" type="submit" value="提交">
      </form>
      <table class="table" style="margin-top: 10px;width:80%;">
        <?php foreach($dis_data as $value):?>
        <tr >
          <td style="width: 50px;">
            <img src="/public/upload/touxiang.jpg" style="width: 50px;height: 50px;border-radius: 50%" >
          </td>
          <td>
            <span style="color: #e5597f"><?php echo $value['dis_name'];?></span> ：<span style="color: #666666;font-size: 12px;"><?php echo date('Y-m-d:H:s:i', $value['dis_tiem']);?></span><br>
            <span style="color:#666666;font-size: 14px;"><?php echo $value['dis_content'];?></span>
          </td>
        </tr>
        <?php endforeach ;?>
      </table>
    </div>
    <div class="otherlink">
      <h2>相关文章</h2>
      <ul>
        <?php foreach($tuijian_rew as $value):?>
        <li><a href="?c=Article&a=Details&art_id=<?php echo$value['art_id'];?>" title="<?php echo$value['art_title'];?>"><?php echo$value['art_title'];?></a></li>
        <?php endforeach ?>
      </ul>
    </div>
    <div class="">
    </div>
  </div>
  <?php include'./app/home/view/right.html';?>
</article>
<footer>
  <p> <a href="http://www.1flove.com/" target="_blank"><?php echo$setup_data['icp_code'];?></a> </p>
</footer>
<script src="js/silder.js"></script>
</body>
</html>
<script>
    function show() {
        if(document.getElementById('name').value ===''){
            alert("请输入姓名");
            return false;
        }else if(document.getElementById('content').value ===''){
            alert("请输入留言内容");
            return false;
        }
    }
</script>